function t_y = CalcDClothoidApproximation_f(t_LongDist_f, LineDy0K1_f, LineAlpPsiK1_f, LineKapC0K1_f, LineKapDxC1K1_f)


    t_y = CalcDClothoidApproximation_F(t_LongDist_f, LineDy0K1_f, LineAlpPsiK1_f, LineKapC0K1_f, LineKapDxC1K1_f);
end




function t_fx_f =  CalcDClothoidApproximation_F(dX_f, dY0_f, alpPsi_f, kapC0_f, kapDxC1_f)


    % Equation for clothoid approximation
    % f(x) = y0 + tan(psi)*x + 1/2*C0*x^2 + 1/6*C1*x^3

    t_tempTan_f = tan(alpPsi_f);

    t_fx_f = (1.0 / 6.0) * kapDxC1_f;
    t_fx_f = (t_fx_f * dX_f) + (0.5* kapC0_f);
    t_fx_f = (t_fx_f * dX_f) + t_tempTan_f;
    t_fx_f = (t_fx_f * dX_f) + dY0_f;
end